'Programmer: Tommy Nix
'Class: CPT212
'Purpose: To create a website that has 2 pages: a User Account Creation and a Account Creation Congratulatory while using ASP.Net Validation Controls
Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
        UnobtrusiveValidationMode = System.Web.UI.UnobtrusiveValidationMode.None
    End Sub
    Protected Sub btnResetForm_Click(sender As Object, e As EventArgs) Handles btnResetForm.Click
        txtLastName.Text = ""
        txtFirstName.Text = ""
        txtDateofBirth.Text = ""
        txtUserID.Text = ""
        txtPassword.Text = ""
        txtConPassword.Text = ""
    End Sub
    Protected Sub CVUserID_ServerValidate(source As Object, args As ServerValidateEventArgs) Handles CVUserID.ServerValidate
        If Len(args.Value) < 5 Then
            args.IsValid = False

        Else
            args.IsValid = True
        End If
    End Sub
    Protected Sub btnCreateAccount_Click(sender As Object, e As EventArgs) Handles btnCreateAccount.Click
        If Page.IsValid Then
            Response.Redirect(String.Format("Congraulations Form.aspx"))
        End If
    End Sub
End Class
